<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>
			Document
		</title>
		<hdjs/>
		<js file='__CONTROLLER_VIEW__/js/js.js'/>
		<script>
			action='add';
		</script>
	</head>
	<body>
		<form method="post" class="hd-form" enctype="multipart/form-data">
			<div class="wrap">
				<div class="menu_list">
					<ul>
						<li>
							<a href="{|U:'index'}"  class="action">
								商品列表
							</a>
						</li>
					</ul>
				</div>
				<div class="tab">
					<ul class="tab_menu">
						<li lab="base">
							<a>
								基本信息
							</a>
						</li>
						<li lab="content" class="action">
							<a>
								内容
							</a>
						</li>
						<li lab="image" class="action">
							<a>
								图片
							</a>
						</li>
					</ul>
					<div class="tab_content">
						<div id="base">
							<table class="table1">
								
								<tr>
									<th class="w100">
										栏目
									</th>
									<td>
										<select name='cid' onchange="getAttrForm(this)">
											<option value="0">==选择栏目==</option>
											<list from="$category" name='cat'>
											<option value="{$cat.cid}" <if value='$cat.cattype eq 1'>disabled=""</if>>{$cat._name}</option>
											</list>
										</select>
									</td>
								</tr>
								<tr>
									<th class="w100">
										商品名称
									</th>
									<td>
										<input type="text" name='gname' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										价格
									</th>
									<td>
										<input type="text" name='price' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										库存
									</th>
									<td>
										<input type="text" name='stock' class="w200"/>
									</td>
								</tr>
							</table>
							<div id='goodsAttr'>
								
							</div>
						</div>
						<div id="content">
							<table class="table1">
								<tr>
									<th class="w100">
										关键字
									</th>
									<td>
										<input type="text" name='keywords' class="w200"/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										描述
									</th>
									<td>
										<textarea name="description" class="w300 h100"></textarea>										
									</td>
								</tr>
								<tr>
									<th class="w100">
										详细介绍
									</th>
									<td>
										<ueditor name='content'/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										服务
									</th>
									<td>
										<textarea name="service" class="w300 h100"></textarea>										

									</td>
								</tr>
								<tr>
									<th class="w100">
										查看次数
									</th>
									<td>
										<input type="text" name='click' class="w200" />
									</td>
								</tr>
								<tr>
									<th class="w100">
										上架时间
									</th>
									<td>
										<input type="text" readonly="readonly" id="addtime" name="addtime"
										value="{|date:'Y/m/d h:i:s'}"
										class="w150"/>
										<script>$('#addtime').calendar({
	format: 'yyyy/MM/dd HH:mm:ss'
});</script>
									</td>
								</tr>
							</table>
						</div>
						<div id="image">
							<table class="table1">
								<tr>
									<th class="w100">
										首页图片 
									</th>
									<td>
										<input type="file" name='index_image'/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										列表页图片  
									</th>
									<td>
										<input type="file" name='list_image'/>
									</td>
								</tr>
								<tr>
									<th class="w100">
										详情页产品图
									</th>
									<td>
										<table id="goodsImages">
											<tr>
												<td>
													<input type="file" name='image[]' class="w200"/>
										<button type="button" class="hd-cancel" onclick="addImageInput()">增加</button>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
				<div class="position-bottom">
					<input type="submit" class="hd-success" />
				</div>
			</div>
		</form>
	</body>
</html>
